package com.binge.test9;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.util.UUID;
import java.util.function.Function;

/**
 * ClassName:FunctionTest
 * Package:com.binge.test9
 * Description:
 *
 * @Author @Bin
 * @Date 2024/8/1-11:38
 * @Version: v1.0
 */
@Slf4j
public class FunctionTest {

    @Test
    public void test1() {

       funcTest(s->s+"world",s->s+"java");


    }


    public  void funcTest(Function<String,String> func1,Function<String,String> func2) {
        String result = func1.andThen(func2).apply("hello");
        System.out.println(result);

    }


    @Test
    public void test2() {
        String str = "5061F5F1-DA85-40AD-9983-14FFB640Z010".toLowerCase();
        UUID uuid = UUID.fromString(str);
        log.info("uuid:{}",uuid);
    }
}
